/*  1:   */ package org.jetbrains.rsa;
/*  2:   */ 
/*  3:   */

import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.RSAKeyGenParameterSpec;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class RSAKeysGenerator
/* 12:   */ {
/* 13:   */   private static final int a = 512;
/* 14:   */   
/* 15:   */   public static void main(String[] paramArrayOfString)
/* 16:   */     throws Exception
/* 17:   */   {
/* 18:17 */     KeyPairGenerator localKeyPairGenerator = KeyPairGenerator.getInstance("RSA");
/* 19:18 */     localKeyPairGenerator.initialize(new RSAKeyGenParameterSpec(512, RSAKeyGenParameterSpec.F4));
/* 20:19 */     KeyPair localKeyPair = localKeyPairGenerator.generateKeyPair();
/* 21:   */     
/* 22:21 */     BigInteger localBigInteger1 = ((RSAPrivateKey)localKeyPair.getPrivate()).getModulus();
/* 23:22 */     BigInteger localBigInteger2 = ((RSAPrivateKey)localKeyPair.getPrivate()).getPrivateExponent();
/* 24:   */     
/* 25:24 */     BigInteger localBigInteger3 = ((RSAPublicKey)localKeyPair.getPublic()).getModulus();
/* 26:25 */     BigInteger localBigInteger4 = ((RSAPublicKey)localKeyPair.getPublic()).getPublicExponent();
/* 27:   */     
/* 28:27 */     System.out.println("private static BigInteger PRIVATE_MOD = new BigInteger(\"" + localBigInteger1.toString(16) + "\", 16);");
/* 29:28 */     System.out.println("private static BigInteger PRIVATE_EXP = new BigInteger(\"" + localBigInteger2.toString(16) + "\", 16);");
/* 30:29 */     System.out.println("private static BigInteger PUBLIC_MOD = new BigInteger(\"" + localBigInteger3.toString(16) + "\", 16);");
/* 31:30 */     System.out.println("private static BigInteger PUBLIC_EXP = new BigInteger(\"" + localBigInteger4.toString(16) + "\", 16);");
/* 32:   */   }
/* 33:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.rsa.RSAKeysGenerator

 * JD-Core Version:    0.7.0.1

 */